<template>
    <el-table :data="data" stripe class="w-full" :default-sort="{ prop: 'PV', order: 'descending' }" :fit="true">
        <el-table-column type="index" label="序号" width="100" align="center" />
        <el-table-column prop="url" label="页面url" align="center">
             <template #default="scope">
                <el-link type="primary" :href="scope.row.url" target="_blank">{{ scope.row.url }}</el-link>
            </template>
        </el-table-column>
        <el-table-column prop="PV" label="PV" width="150" sortable align="center" />
        <el-table-column prop="UV" label="UV" width="150" sortable align="center" />
        <el-table-column prop="IP" label="IP" width="150" sortable align="center" />
    </el-table>
</template>

<script setup lang="ts">
import { IRegion } from '@/api/sem/types'

defineProps<{
    data: IRegion[]
}>()

</script>

<style lang="scss" scoped>
:deep(.el-link){
    &:hover{
        color: var(--el-table-text-color);
        &::after{
            content:'';
            border-color: var(--el-table-text-color);
        }
    }
}
</style>